package com.lucaswangdev.logindemo.biz.service;

import com.lucaswangdev.logindemo.biz.request.user.UserCreateRequest;
import com.lucaswangdev.logindemo.biz.request.user.UserDeleteRequest;
import com.lucaswangdev.logindemo.biz.request.user.UserQueryRequest;
import com.lucaswangdev.logindemo.biz.request.user.UserUpdateRequest;
import com.lucaswangdev.logindemo.biz.response.common.PagingResponse;
import com.lucaswangdev.logindemo.model.dto.UserDTO;

import javax.servlet.http.HttpServletRequest;

public interface UserService {

    Boolean create(UserCreateRequest userCreateRequest);

    /**
     * 用户登录
     */
    UserDTO userLogin(UserCreateRequest userCreateRequest, HttpServletRequest request);

    /**
     * 获取当前登录用户
     *
     * @param request
     * @return
     */
    UserDTO getLoginUser(HttpServletRequest request);

    /**
     * 用户注销
     * @param request
     * @return
     */
    boolean userLogout(HttpServletRequest request);

    PagingResponse<UserDTO> listPage(UserQueryRequest queryRequest);

    Boolean modified(UserUpdateRequest userUpdateRequest);

    Boolean deleteById(UserDeleteRequest userDeleteRequest);
}
